﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

public class CharacterAttributes : MonoBehaviour
{
    public AttributeInt HP ;
}

[Serializable]
public struct AttributeInt
{
    private int value;
    public int value_Min;
    public int value_Max;

    public int Value
    {
        get
        {
            return value;
        }

        set
        {
            this.value =Mathf.Clamp( value,value_Min,value_Max);
        }
    }

}
[Serializable]
public struct AttributeFloat
{
    private float value;
    public float value_Min;
    public float value_Max;

    public float Value
    {
        get
        {
            return value;
        }

        set
        {
            this.value = Mathf.Clamp(value, value_Min, value_Max);
        }
    }
}